**Data notes and sources for the Province-level data merged into the IFES survey (variables -Ukrainian)
//imports and exports are measured in thousands of USD in the statistical annuals, they are converted to hryvnia and then to percentage of GRP (which are listed in hryvnia) 
//to convert from dollars to hryvnia, the following is used: 2013 exchange rate: 7.993 UAH per 1 USD
			//Exchange rate from World Bank Indicators http://data.worldbank.org/indicator/PA.NUS.FCRF?page=1
//Ukrainian= pct of native Ukrainian speakers in province from 2001 census, http://database.ukrcensus.gov.ua/MULT/Database/Census/databasetree_uk.asp (in Ukrainian)
//Specific information on the trade and other province level data is as follows (All of the following sources are in Ukrainian)
	//GRP  Statistical Annual Regions of Ukraine 2015, Table 1.2, p. 12
	//Unemployment rate ILO Statistical Annual Regions of Ukraine 2015, Table 4.5, p. 72
	//Goods export Statistical Annual Regions of Ukraine 2015, Table 24.6
	//Goods import Statistical Annual Regions of Ukraine 2015, Table 24.7
	//Services export Statistical Annual Regions of Ukraine 2015, Table 24.12
	//Services import Statistical Annual Regions of Ukraine 2015, Table 24.13
	//Oil and gas imports Statistical Annual Regions of Ukraine 2015, Table 24.5
	//Imports and Exports are listed by country in these tables. Authors calculations to get measures for the EU.


use beesleyreplicationisq.dta



**Dependent variables
gen bettercloserrus2=1 if Q10==2
replace bettercloserrus2=0 if Q10==1
*missing for both, neither, don't know, no response, or missing for Q10

gen joincunion2=1 if Q11==2
replace joincunion2=0 if Q11==1
**missing for join neither, don't know, no response or missing for Q11

**For robustness checks
gen bettercloserrus=3 if Q10==2
replace bettercloserrus=2 if Q10==4
replace bettercloserrus=1 if Q10==1
*missing for neither, don't know, no response and missing for Q10


gen joincunion=3 if Q11==2
replace joincunion=2 if Q11==3
replace joincunion=1 if Q11==1
**missing for don't know, no response for Q11



**Language variable
gen easierspeakRuss=1 if Language==2
replace easierspeakRuss=1 if Language==5|Language==6
replace easierspeakRuss=0 if Language==3|Language==4|Language==1

*Nationality
gen rusnat2=1 if D8==2| D8==3
replace rusnat2=0 if D8==1

**control variables

**for Model 1
gen unskilled=1 if D5==5
replace unskilled=0 if D5>0 & D5<5
replace unskilled=0 if D5>5 & D5<98


gen relations=6-Q12E if Q12E<6
**missing for DK, refused

**For Model 2
gen female=1 if D1==2
replace female=0 if D1==1

gen age=D2

gen univplus=1 if D3==6
replace univplus=1 if D3==7
replace univplus=0 if D3<6

gen pensioner=1 if D4==5
replace pensioner=0 if D4<5
replace pensioner=0 if D4>5 & D4<99

gen employed=1 if D4<4
replace employed=0 if D4>3 & D4<99



gen rural=1 if settype==8
replace rural=0 if settype<8
 
gen quallife=(6-Q5) if Q5<6

gen demoverorder=1 if Q20B==1
replace demoverorder=2 if Q20B==2
replace demoverorder=3 if Q20B==3
replace demoverorder=4 if Q20B==4

**Figure 1

gen closertowhom=Q10 if Q10<98
replace closertowhom=. if Q10==98

gen easierspeakUkr=1 if Language==3|Language==4|Language==1
replace easierspeakUkr=0 if Language==5|Language==6 |Language==2 

catplot closertowhom easierspeakU, percent (easierspeakU) stack asyvars

**Figure 2 
catplot joincunion easierspeakUkr, percent (easierspeakUkr) stack asyvars

**Figure 3

twoway (scatter totaltradeRussiapctgrp Ukrainian) (scatter totaltradeEUpctgrp Ukrainian)

**Table 2
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinter.doc, se starlev(10 5 1) bdec(3) replace
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinter.doc, se starlev(10 5 1) bdec(3) merge
meglm  bettercloserrus2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinter.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry if easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinter.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry if easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinter.doc, se starlev(10 5 1) bdec(3) merge


**Table 3
meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinter.doc, se starlev(10 5 1) bdec(3) replace

meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife  demover    [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinter.doc, se starlev(10 5 1) bdec(3) merge

meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinter.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  if easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinter.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  if easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinter.doc, se starlev(10 5 1) bdec(3) merge

**Figure 4
 meglm  bettercloserrus2 rusnat2 c.Ukrainian i.easierspeakRus##c.tottradediffRussiaEUpctgrp  unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
margins, at(tottradediffR=( -.6 (.1) .3) easierspeakR=(0  1)) vsquish 
marginsplot


**Figure 5

meglm  bettercloserrus2 rusnat2 c.Ukrainian i.easierspeakRus##c.tottradediffRussiaEUpctgrp  unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
margins, at(tottradediffR=( -.6 (.1) .3) Ukrainian=(25  75)) vsquish 
marginsplot


**Table A1
meglm  bettercloserrus2 rusnat2 c.Ukrainian  easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2pctseparate.doc, se starlev(10 5 1) bdec(3)  replace

 meglm  bettercloserrus2 rusnat2 c.Ukrainian easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct unskilled  relations female age univplus employed pensioner  unskilled rural  quallife demover   [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2pctseparate.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus2 rusnat2 c.Ukrainian easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct  unskilled  relations female age univplus employed pensioner  unskilled rural  quallife demover   ILO   grpmilhry   [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2pctseparate.doc, se starlev(10 5 1) bdec(3) merge

 meglm  bettercloserrus2 rusnat2 c.Ukrainian easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct  unskilled  relations female age univplus employed pensioner  unskilled rural  quallife demover   ILO   grpmilhry if easierspeakR==1  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2pctseparate.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus2 rusnat2 c.Ukrainian easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct  unskilled  relations female age univplus employed pensioner  unskilled rural  quallife demover   ILO   grpmilhry if easierspeakR==0  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2pctseparate.doc, se starlev(10 5 1) bdec(3) merge

**Table A2
meglm  joincunion2 rusnat2 c.Ukrainian  easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2pctseparate.doc, se starlev(10 5 1) bdec(3)  replace

 meglm  joincunion2 rusnat2 c.Ukrainian easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct unskilled  relations female age univplus employed pensioner  unskilled rural  quallife demover   [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2pctseparate.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2 rusnat2 c.Ukrainian easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct  unskilled  relations female age univplus employed pensioner  unskilled rural  quallife demover   ILO   grpmilhry   [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2pctseparate.doc, se starlev(10 5 1) bdec(3) merge

 meglm  joincunion2 rusnat2 c.Ukrainian easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct  unskilled  relations female age univplus employed pensioner  unskilled rural  quallife demover   ILO   grpmilhry if easierspeakR==1  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2pctseparate.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2 rusnat2 c.Ukrainian easierspeakR##c.totaltradeRussiapct  easierspeakR##c.totaltradeEUpct  unskilled  relations female age univplus employed pensioner  unskilled rural  quallife demover   ILO   grpmilhry if easierspeakR==0  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2pctseparate.doc, se starlev(10 5 1) bdec(3) merge

**Table A3

gen oilorgas=1 if Oblast=="Cherkassy"
replace oilorgas=1 if Oblast=="Rivnenska"
replace oilorgas=1 if Oblast=="Sumska"
replace oilorgas=0 if oilorgas==.

meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations  if oilorgas==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas3.doc, se starlev(10 5 1) bdec(3) replace
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  if oilorgas==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas3.doc, se starlev(10 5 1) bdec(3) merge
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry  if oilorgas==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas3.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry  if oilorgas==0 & easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas3.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry  if oilorgas==0 & easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas3.doc, se starlev(10 5 1) bdec(3) merge

**Table A4


meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations  if oilorgas==0  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas3.doc, se starlev(10 5 1) bdec(3) replace

meglm  joincunion2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife  demover    if oilorgas==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas3.doc, se starlev(10 5 1) bdec(3) merge

meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  if oilorgas==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas3.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  if oilorgas==0 & easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas3.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  if oilorgas==0 & easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas3.doc, se starlev(10 5 1) bdec(3) merge
***

**Table A5
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp    [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using basemodel.doc, se starlev(10 5 1) bdec(3) replace
meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using basemodel.doc, se starlev(10 5 1) bdec(3) merge
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp   i.easierspeakRus##c.totaltradeRussiapctgrp [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using basemodel.doc, se starlev(10 5 1) bdec(3) merge
meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp   i.easierspeakRus##c.totaltradeRussiapctgrp [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using basemodel.doc, se starlev(10 5 1) bdec(3) merge

**Table A6
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffplusinter.doc, se starlev(10 5 1) bdec(3) replace
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffplusinter.doc, se starlev(10 5 1) bdec(3) merge
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffplusinter.doc, se starlev(10 5 1) bdec(3) merge
bysort easierspeakR: meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffplusinter.doc, se starlev(10 5 1) bdec(3) merge
bysort easierspeakU: meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffplusinter.doc, se starlev(10 5 1) bdec(3) merge

**Table A7

meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffplusinter.doc, se starlev(10 5 1) bdec(3) replace

meglm  joincunion2 rusnat2 c.Ukrainian i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife  demover    [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffplusinter.doc, se starlev(10 5 1) bdec(3) merge

meglm  joincunion2 rusnat2 c.Ukrainian i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffplusinter.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2 rusnat2 c.Ukrainian i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry if easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffplusinter.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2 rusnat2 c.Ukrainian i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.easierspeakRus##c.totaltradeRussiapctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry if easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffplusinter.doc, se starlev(10 5 1) bdec(3) merge

*Figure A1
meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)

margins, at(tottradediffR=( -.6 (.1) .3) easierspeakR=(0  1)) vsquish 
marginsplot

**Figure A2
meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)

margins, at(tottradediffR=( -.6 (.1) .3) Ukrainian=(25  75)) vsquish 
marginsplot


**Table A8
meglm  bettercloserrus  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitbcrdiffinter.doc, se starlev(10 5 1) bdec(3) replace
meglm  bettercloserrus  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian  unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitbcrdiffinter.doc, se starlev(10 5 1) bdec(3) merge
meglm  bettercloserrus  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitbcrdiffinter.doc, se starlev(10 5 1) bdec(3) merge
meglm  bettercloserrus  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry if easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitbcrdiffinter.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry if easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitbcrdiffinter.doc, se starlev(10 5 1) bdec(3) merge

**Table A9
meglm  joincunion  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitjcudiffinter.doc, se starlev(10 5 1) bdec(3) replace

meglm  joincunion  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife  demover    [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitjcudiffinter.doc, se starlev(10 5 1) bdec(3) merge

meglm  joincunion  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitjcudiffinter.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry if easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitjcudiffinter.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion  i.easierspeakRus##c.tottradediffRussiaEUpctgrp rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry  if easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(ordinal) link(logit)vce(robust)
outreg using ologitjcudiffinter.doc, se starlev(10 5 1) bdec(3) merge

**Table A10
gen ukrpctoblast=Ukrainian
gen ilo=ILO
gsem(i.closertowhom <- c.ukrpctoblast  i.rusnat2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.unskilled c.relations i.female c.age i.univplus i.employed i.pensioner  i.rural  c.quallife c.demover c.ilo  c.grpmilhry   M1[Oblast]@1), mlogit
outreg using mlogitbcrdiffinter.doc, starlevel (10, 5, 1) bdec (3) se replace

*Table A11
gsem(i.joincunion <- c.ukrpctoblast  i.rusnat2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.unskilled c.relations i.female c.age i.univplus i.employed i.pensioner  i.rural  c.quallife c.demover c.ilo  c.grpmilhry   M1[Oblast]@1), mlogit
outreg using mlogitjcudiffinter.doc, starlevel (10, 5, 1) bdec (3) se replace

**Table A12
bysort easierspeakRus: gsem(i.closertowhom <- c.ukrpctoblast  i.rusnat2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.unskilled c.relations i.female c.age i.univplus i.employed i.pensioner  i.rural  c.quallife c.demover c.ilo  c.grpmilhry   M1[Oblast]@1), mlogit
outreg using mlogitbcrdiffinterrus.doc, starlevel (10, 5, 1) bdec (3) se merge

**Table A13

bysort easierspeakUkr: gsem(i.closertowhom <- c.ukrpctoblast  i.rusnat2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.unskilled c.relations i.female c.age i.univplus i.employed i.pensioner  i.rural  c.quallife c.demover c.ilo  c.grpmilhry   M1[Oblast]@1), mlogit
outreg using mlogitbcrdiffinterU.doc, starlevel (10, 5, 1) bdec (3) se replace

**Table A14
bysort easierspeakRus: gsem(i.joincunion <- c.ukrpctoblast  i.rusnat2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.unskilled c.relations i.female c.age i.univplus i.employed i.pensioner  i.rural  c.quallife c.demover c.ilo  c.grpmilhry   M1[Oblast]@1), mlogit
outreg using mlogitjcudiffinterrus.doc, starlevel (10, 5, 1) bdec (3) se replace

**Table A15
bysort easierspeakUkr: gsem(i.joincunion <- c.ukrpctoblast  i.rusnat2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp i.unskilled c.relations i.female c.age i.univplus i.employed i.pensioner  i.rural  c.quallife c.demover c.ilo  c.grpmilhry   M1[Oblast]@1), mlogit
outreg using mlogitjcudiffinterU.doc, starlevel (10, 5, 1) bdec (3) se replace

**Table A16
gen probenergy=1 if Q9_9==9
replace probenergy=0 if Q9_9==.


meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas.doc, se starlev(10 5 1) bdec(3) replace
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian  unskilled relations female age univplus employed pensioner   rural  quallife    demover  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas.doc, se starlev(10 5 1) bdec(3) merge
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry totalimportgasoil probenergy [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry totalimportgasoil probenergy if easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas.doc, se starlev(10 5 1) bdec(3) merge
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry totalimportgasoil probenergy if easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffintergas.doc, se starlev(10 5 1) bdec(3) merge

**Table Q17
meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian unskilled relations  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas.doc, se starlev(10 5 1) bdec(3) replace
meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian  unskilled relations female age univplus employed pensioner   rural  quallife    demover  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas.doc, se starlev(10 5 1) bdec(3) merge
meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry totalimportgasoil probenergy [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry totalimportgasoil probenergy if easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas.doc, se starlev(10 5 1) bdec(3) merge
meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  totalimportgasoil probenergy rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry totalimportgasoil probenergy if easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffintergas.doc, se starlev(10 5 1) bdec(3) merge

***Table A18 
gen powerservesforint=1 if Q41==5
replace powerserves=0 if Q41<5
replace powerserves=0 if Q41==6|Q41==7


gen improverelR=6-Q12G if Q12G<6
gen improverelWest=6-Q12H if Q12H<6


meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp powerserves improverelR improverelW rusnat2 c.Ukrainian unskilled relations   [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinternatcont.doc, se starlev(10 5 1) bdec(3) replace
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp powerserves improverelR improverelW rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinternatcont.doc, se starlev(10 5 1) bdec(3) merge
meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp powerserves improverelR improverelW rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry   [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinternatcont.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp powerserves improverelR improverelW rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry if easierspeakR==1 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinternatcont.doc, se starlev(10 5 1) bdec(3) merge
 meglm  bettercloserrus2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp powerserves improverelR improverelW rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner  unskilled rural  quallife    demover  ILO   grpmilhry if easierspeakR==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitbcr2diffinternatcont.doc, se starlev(10 5 1) bdec(3) merge



***Table A19

meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp  powerserves improverelR improverelW  rusnat2 c.Ukrainian unskilled relations [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinternatcont.doc, se starlev(10 5 1) bdec(3) replace

meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp powerserves improverelR improverelW rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife  demover     [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinternatcont.doc, se starlev(10 5 1) bdec(3) merge

meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp powerserves improverelR improverelW rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry powerserves improverelR improverelW   [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinternatcont.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2 i.easierspeakRus##c.tottradediffRussiaEUpctgrp  powerserves improverelR improverelW rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry powerserves improverelR improverelW if easierspeakRus==1  [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinternatcont.doc, se starlev(10 5 1) bdec(3) merge
 meglm  joincunion2  i.easierspeakRus##c.tottradediffRussiaEUpctgrp powerserves improverelR improverelW rusnat2 c.Ukrainian unskilled relations female age univplus employed pensioner   rural  quallife   demover   ILO   grpmilhry powerserves improverelR improverelW if easierspeakRus==0 [pweight= weight_Ukraine] || Oblast:  , family(binomial) link(logit)vce(robust)
outreg using logitjcu2diffinternatcont.doc, se starlev(10 5 1) bdec(3) merge



